package com.swlz.servlet.admin;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.swlz.dto.UserSearch;
import com.swlz.entity.User;
import com.swlz.service.RoleService;
import com.swlz.service.UserService;
import com.swlz.service.impl.RoleServiceImpl;
import com.swlz.service.impl.UserServiceImpl;
import  com.swlz.servlet.HttpServletSupport;

import cn.hutool.extra.servlet.ServletUtil;

/**<pre>
 * - 
 * ClassName : com.swlz.servlet.admin.UserListServlet
 * Author : swlz
 * E-Mail : 2233875735@qq.com
 * Date : 2020年7月25日 上午10:51:10
 * Version : 1.0
 * Copyright 2020 swlz.top Inc. All rights reserved. 
 * Warning: this content is only for internal circulation of the company. 
 * It is forbidden to divulge it or use it for other commercial purposes.
 * </pre>
 **/
@WebServlet("/admin/user-list-3.let")
public class UserList3Servlet extends HttpServletSupport {

	private UserService userService = new UserServiceImpl();
	private RoleService roleService = new RoleServiceImpl();
	
	
	public String execute(HttpServletRequest request, UserSearch search) throws Exception {		
		request.setAttribute("roleList", roleService.list());
		request.setAttribute("search", search);
		request.setAttribute("p", userService.page(search));
		return "/admin/user-list-3";
	}
}
